<?php

declare(strict_types=1);

namespace App\Controller\Backend;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Annotation\Controller;

#[Controller]
class BaseController extends AbstractController
{
    public $admin;
    
    public function __construct()
    {
        parent::__construct();
        
        $token = $this->request->header('Authorization', '');
        $admin_info = $this->cache->get('Authorization:' . $token);

        $this->admin = json_decode($admin_info);
    }
}
